package com.ruoyi.web.controller.shopping.carousel;

import com.ruoyi.system.domain.Carousel;
import com.ruoyi.system.service.CarouselService;
import com.ruoyi.system.view.common.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/xiaomi/v2/carousel")
@RestController
public class carouselController {
    @Autowired
    private CarouselService carouselService;

    @GetMapping
    public R<List<Carousel>> getCarousel(){
        List<Carousel> all = carouselService.getAll();
        System.out.println(all);
        return R.success(all);
    }
}
